package com.learn.english.model.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.*;

import java.util.*;

/**
 * @author TISNIW
 * @version 1.0
 * @date 2024/8/20 10:34
 * @desc
 */
@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class RegisterDto {
    @JsonProperty("username")
    @NotBlank(message = "用户名不能为空")
    private String username;
    @JsonProperty("email")
    @Email(message = "邮箱格式不正确")
    private String email;
    @JsonProperty("password")
    @Size(min = 6, max = 32, message = "密码长度应在6~32之间")
    private String password;
    @JsonProperty("code")
    private String code;
    @JsonProperty("avatar_url")
    private String avatarUrl;
}
